package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Petknowledge;
import com.pets.springboot_petshop.mapper.PetknowledgeMapper;
import com.pets.springboot_petshop.service.PetknowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/15 下午4:55 周二
 * @Description: 宣传栏实现类
 */
@Service
public class PetknowledgeServiceImpl implements PetknowledgeService {
    @Autowired
    private PetknowledgeMapper petknowledgeMapper;

    @Override
    public Petknowledge select(int id) {
        return petknowledgeMapper.select(id);
    }

    @Override
    public List<Petknowledge> selectadmin_id(int admin_id) {
        return petknowledgeMapper.selectadmin_id(admin_id);
    }

    @Override
    public List<Petknowledge> findAll() {
        return petknowledgeMapper.findAll();
    }

    @Override
    public int add(Petknowledge petknowledge) {
        return petknowledgeMapper.add(petknowledge);
    }

    @Override
    public int delete(int id) {
        return petknowledgeMapper.delete(id);
    }

    @Override
    public int update(Petknowledge petknowledge) {
        return petknowledgeMapper.update(petknowledge);
    }
}
